<?php
   include "connect.php";
   $badgedata = $_POST['badgedata'];
   $badgedata  = explode(',', $badgedata[0]);
   $sta =  $badgedata[2];
   $flag =  $badgedata[6];
$result = mysqli_query($con, "UPDATE badge_id SET flag='$flag' WHERE id='1' ");
$result = mysqli_query($con, "UPDATE badge_id SET sta='$sta' WHERE id='1' ");
		
require_once(dirname(__FILE__) . "/pr_sta.php");
		
?>